//
//  AddVideoBtnTableViewCell.m
//  MIDI
//
//  Created by 王禹丞 on 15/10/20.
//  Copyright (c) 2015年 QXSX. All rights reserved.
//

#import "AddVideoBtnTableViewCell.h"


@interface AddVideoBtnTableViewCell()


@property (weak, nonatomic) IBOutlet UIButton *applyBtn;

@property (weak, nonatomic) IBOutlet UIButton *cancelBtn;


@end



@implementation AddVideoBtnTableViewCell

+(instancetype)cellWithTableView:(UITableView *)tableView{
    
    static NSString *ID = @"AddVideoBtnTableViewCell";
    AddVideoBtnTableViewCell  *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle]loadNibNamed:@"AddVideoBtnTableViewCell" owner:nil options:nil]firstObject] ;
        
    }
    
    [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    
    return cell;
}

-(void)awakeFromNib{

    [_applyBtn.layer setMasksToBounds:YES];

    [_applyBtn.layer setCornerRadius:5.0];

    [_cancelBtn.layer setMasksToBounds:YES];
    
    [_cancelBtn.layer setCornerRadius:5.0];
    
    [self.applyBtn addTarget:self action:@selector(applyBtn_Click:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.cancelBtn addTarget:self action:@selector(cancelBtn_Click) forControlEvents:UIControlEventTouchUpInside];
}

- (void)applyBtn_Click:(UIButton *)sender{
    
    if ([self.delegate respondsToSelector:@selector(uploadAddVideoBtn:)]) {
        
        [self.delegate uploadAddVideoBtn:sender];
    }
}

- (void)cancelBtn_Click{
    
    NSLog(@"111");
}

@end









